package javaseof10day.day2.pm;

import java.util.Calendar;

public class weekIfDemo {

	public static void main(String[] args) {

		//写一个根据今天日期判断星期几的if  else 流程判断
		Calendar calendar = Calendar.getInstance();
	
		int num = calendar.get(Calendar.DAY_OF_WEEK) - 1;



		if (num == 0) {
			System.out.println("今天星期日");
		} else if (num == 1) {
			System.out.println("今天星期一");
		} else if (num == 2) {
			System.out.println("今天星期二");
		} else if (num == 3) {
			System.out.println("今天星期三");
		} else if (num == 4) {
			System.out.println("今天星期四");
		} else if (num == 5) {
			System.out.println("今天星期五");
		}else if (num == 6) {
			System.out.println("今天星期六");
		} else {
			System.out.println("抱歉，永远跑不到这里了吧");
		}

	}

}
